package com.my.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person {
    //json转换的时候忽略这个id
    @JsonIgnore
    private String id;
    //姓名
    private String name;
    //年龄
    private Integer age;
    //出⽣⽇期, ⽇期格式必须和ES中这个索引字段的⽇期格式保持⼀致
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
}